1. Field of the Invention
This invention relates generally to the field of video and graphics control and more specifically to automatically processing graphics data in old graphics formats for display on devices utilizing newer graphics formats.
2. Description of the Related Art
Computer systems have been implemented for years as desktop systems utilizing monitors. These monitors typically are capable of displaying a number of different resolutions, a resolution being a certain number of pixels which may be displayed on a screen. Resolutions are typically specified as a width by a height such as the IBM VGA standard of 640 pixels by 480 pixels (640×480). On a classic CRT or cathode ray tube monitor a 640×480 pixel resolution would eventually be translated into an image that could be displayed by the cathode ray guns of the monitor. Other resolutions commonly found are 640 by 400 pixels (640×400), 640 by 200 pixels (640×200) and 640 by 350 pixels (640×350). Since all of these resolutions have existed for years, much software has been written which is designed to work with one or more of these resolutions and typically a computer system would be capable of using more than one mode or more than one resolution. The display mode or resolution would be something that could be switched either by software or by hardware. If the display mode was switchable by software it might be switchable dynamically by a program or it might be switchable between execution of various different programs on the computer system or between execution of various different programs by an operating system running on the computer system.
Since these resolutions were often dynamically switchable a program might start out running in a text mode or low resolution mode, such as 640×200, suitable for displaying large fonts and then switch at some point to a graphics or high resolution mode, such as the 640×400 mode, which would be more suitable for displaying graphics images. Graphics images are often made up of numerous individual pixels which may be turned off or on from one moment to the next. Note that in the low resolution mode such as a text mode all of the pixels can be turned off or on from one moment to the next. However, the pixels are typically relatively constant because predetermined patterns are used for displaying the characters in text mode.
With the advent of the liquid crystal display a new type of monitor or display was available. Furthermore, liquid crystal displays are capable of higher resolution than the 640×480 IBM VGA standard for example. One common resolution of a liquid crystal display is 1024 by 768 pixels, that is 1024 pixels wide by 768 pixels high (1024×768). Liquid crystal displays, unlike cathode ray tubes, do not operate with cathode ray guns. A cathode ray gun will excite a multitude of phosphors which will cause an image to appear on the cathode ray tube, and often multiple phosphors make up a single pixel.
A liquid crystal display has a small cell for each pixel which may be displayed or may have multiple cells depending on whether the liquid crystal display is a color or a black and white system for example, but there is a one to one correspondence between the liquid crystal cells of the liquid crystal display and the pixels that may be displayed by the liquid crystal display. As a result when one wishes to run a program written for the IBM VGA standard 640×480 or for a number of different resolutions such as 640×400 and 640×200, these must be scaled or centered or both scaled and centered to be displayed on the liquid crystal display. However scaling and centering these images that are generated by these programs in order to display them on the liquid crystal display is not necessarily a completely straightforward process.
Turning to FIG. 1, a prior art graphics processing apparatus 100 is illustrated. A vertical display height register 110 is contained within the graphics processing apparatus 100 and into it may be written or may be preprogrammed the display height that a software program is using. Also a DDA (Differential Digital Analyzer) value register 120 is contained within the graphics processing apparatus and to that register may be written a DDA value which would be a 10 bit value suitable for use by a vertical expansion DDA engine 140. The vertical expansion DDA engine performs the process of expanding an image such as a 640×480 image on to a larger screen size, for instance a 640×480 image may be expanded to a 960×720 image. Also in graphics processing apparatus 100 is a vertical centering register 130 containing a value suitable for use by a vertical centering control logic block 150. The vertical centering control logic block 150 may be used to offset an image generated by a software program from the edge of the liquid crystal display in the vertical direction. In the prior art configuration each of these registers must be reprogrammed each time the software changes the resolution that it is using.
IBM VGA is an industrial standard. All applications programs written for the IBM VGA standard may directly change any published IBM VGA registers without going through the operating system software (such as MSDOS, MS Windows, etc.). For example, the vertical parameter (height in the resolution) is most likely to be changed as most of the resolutions all use the 640 pixel width but vary the number of pixels that may be used for the height of the image any time the mode is changed. Therefore, it is very likely that the vertical parameters embodied in vertical display height register 110, DDA value register 120 and vertical centering register 130 must be altered. Unfortunately programming by software developers is often unorthodox. The need to speed up code or save memory caused programmers to choose shortcuts which result in an operating system or an underlying computer system not being alerted that the software is planning to change modes or has changed display modes. In particular, it is not uncommon for a video game program to switch from a text mode to a graphics mode by resorting to a short cut which skips any intervening layers between the program and the underlying computer systems such as the operating system. In so doing the program may save time and memory on an older computer system but fail to alert a newer computer system such as one managing a liquid crystal display to the fact that it is changing resolutions. Likewise it is not uncommon for programs to automatically initialize the resolution to whatever resolution the program will run without necessarily alerting the operating system through use of standard procedure or function calls which the operating system or graphics driver provides to properly set the resolution of the display.
Therefore, it would be advantageous to include within graphics controllers a method for fitting an image (either text or graphics) which may vary in resolution from application to application into a LCD display with a fixed resolution such as 1024×768 for example.